# -*- coding: utf-8 -*-

import logging

from project.app import project_app

logger = logging.getLogger(__name__)


@project_app.task(bind=True)
def task_func(self, args_name: str, kwargs_name: str = '', ):
    logger.info(f'args_name={args_name},kwargs_name={kwargs_name}.')
    return 'OK'


@project_app.task(bind=True)
def string_concat(self, arg0_name: str, arg1_name: str, ):
    logger.info(f'arg0_name={arg0_name},arg1_name={arg1_name}.')
    return arg0_name + '|' + arg1_name


@project_app.task(bind=True)
def text_join(self, str_list: list, ):
    logger.info(f'str_list={str_list}.')
    return '|'.join(str_list)


@project_app.task(bind=True)
def task_zero(self, arg0_name: str, arg1_name: str, ):
    logger.info(f'arg0_name={arg0_name},arg1_name={arg1_name}.')
    return 'OK'


@project_app.task(bind=True)
def task_one1(self, args_name: str, ):
    logger.info(f'args_name={args_name}.')
    return 'OK'


@project_app.task(bind=True)
def task_one2(self, args_name: str, ):
    logger.info(f'args_name={args_name}.')
    return 'OK'


@project_app.task(bind=True)
# @project_app.task(bind=True, ignore_result=True)
def task_two1(self, args_name: str, ):
    logger.info(f'args_name={args_name}.')
    return 'OK'


@project_app.task(bind=True)
# @project_app.task(bind=True, ignore_result=True)
def task_two2(self, args_name: str, ):
    logger.info(f'args_name={args_name}.')
    return 'OK'


@project_app.task(bind=True)
def task_four(self, args_name: str, ):
    logger.info(f'args_name={args_name}.')
    return 'OK'
